var c_cache=[],dle_poll_voted=[],file_uploaders=[];function reload(){var e=(new Date).getTime();document.getElementById("dle-captcha").innerHTML='<img src="'+dle_root+"engine/modules/antibot/antibot.php?rndval="+e+'" width="160" height="80" alt="" />'}function dle_change_sort(e,t){var o=document.getElementById("news_set_sort");return o.dlenewssortby.value=e,o.dledirection.value=t,o.submit(),!1}function doPoll(e,t){var o=document.getElementById("dlepollform_"+t),n=o.status.value,i="";if(1!=dle_poll_voted[t]){if("results"!=e&&1!=n){for(var d=0;d<o.elements.length;d++){var l=o.elements[d];if("radio"==l.type&&1==l.checked){i=l.value;break}"checkbox"==l.type&&1==l.checked&&(i=i+l.value+" ")}if("vote"==e&&""==i)return;dle_poll_voted[t]=1}else n=1,o.status.value=1;1==n&&"vote"==e&&(n=0,o.status.value=0,e="list"),ShowLoading(""),$.post(dle_root+"engine/ajax/controller.php?mod=poll",{news_id:t,action:e,answer:i,dle_skin:dle_skin,user_hash:dle_login_hash},function(e){HideLoading(""),$("#dle-poll-list-"+t).fadeOut(500,function(){$(this).html(e),$(this).fadeIn(500)})})}}function IPMenu(e,t,o,n){var i=[];return i[0]='<a href="https://www.nic.ru/whois/?searchWord='+e+'" target="_blank">'+t+"</a>",i[1]='<a href="'+dle_root+dle_admin+"?mod=iptools&ip="+e+'" target="_blank">'+o+"</a>",i[2]='<a href="'+dle_root+dle_admin+"?mod=blockip&ip="+e+'" target="_blank">'+n+"</a>",i}function ajax_save_for_edit(e,t){var o={};return"2"==quick_wysiwyg&&tinyMCE.triggerSave(),$.each($("#ajaxnews"+e).serializeArray(),function(e,t){o[t.name]=t.value}),o.id=e,o.field=t,o.action="save",o.user_hash=dle_login_hash,ShowLoading(""),$.post(dle_root+"engine/ajax/controller.php?mod=editnews",o,function(e){HideLoading(""),"ok"!=e?DLEalert(e,dle_info):($("#dlepopup-news-edit").dialog("close"),DLEconfirm(dle_save_ok,dle_confirm,function(){location.reload(!0)}))}),!1}function ajax_prep_for_edit(d,l){for(var e=0,t=c_cache.length;e<t;e++)e in c_cache&&(!c_cache[e]&&""==c_cache[e]||ajax_cancel_comm_edit(e));return ShowLoading(""),$.get(dle_root+"engine/ajax/controller.php?mod=editnews",{id:d,field:l,action:"edit"},function(e){HideLoading("");var o="none";$("#modal-overlay").remove(),$("body").prepend('<div id="modal-overlay" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #666666; opacity: .40;filter:Alpha(Opacity=40); z-index: 980; display:none;"></div>'),$("#modal-overlay").css({filter:"alpha(opacity=40)"}).fadeIn();var t={};t[dle_act_lang[3]]=function(){$(this).dialog("close")},t[dle_act_lang[4]]=function(){ajax_save_for_edit(d,l)},$("#dlepopup-news-edit").remove(),$("body").prepend("<div id='dlepopup-news-edit' class='dlepopupnewsedit' title='"+menu_short+"' style='display:none'></div>"),$(".dlepopupnewsedit").html("");var n=.9*$(window).height(),i=.9*$(window).width();1024<i&&(i=1024),$("#dlepopup-news-edit").dialog({autoOpen:!0,width:i,height:n,buttons:t,resizable:!1,dialogClass:"modalfixed dle-popup-quickedit",dragStart:function(e,t){o=$(".modalfixed").css("box-shadow"),$(".modalfixed").css("box-shadow","none")},dragStop:function(e,t){$(".modalfixed").css("box-shadow",o)},close:function(e,t){$(this).dialog("destroy"),$("#modal-overlay").fadeOut(function(){$("#modal-overlay").remove()})}}),830<$(window).width()&&530<$(window).height()&&($(".modalfixed.ui-dialog").css({position:"fixed"}),$("#dlepopup-news-edit").dialog("option","position",{my:"center",at:"center",of:window})),$("#dlepopup-news-edit").css({overflow:"auto"}),$("#dlepopup-news-edit").css({"overflow-x":"hidden"}),$("#dlepopup-news-edit").html(e)},"html"),!1}function ajax_comm_edit(t,e){for(var o=0,n=c_cache.length;o<n;o++)o in c_cache&&""!=c_cache[o]&&ajax_cancel_comm_edit(o);return c_cache[t]&&""!=c_cache[t]||(c_cache[t]=$("#comm-id-"+t).html()),ShowLoading(""),$.get(dle_root+"engine/ajax/controller.php?mod=editcomments",{id:t,area:e,action:"edit"},function(e){HideLoading(""),$("#comm-id-"+t).html(e),setTimeout(function(){$("html,body").stop().animate({scrollTop:$("#comm-id-"+t).offset().top-100},700)},600)},"html"),!1}function ajax_cancel_comm_edit(e){return""!=c_cache[e]&&$("#comm-id-"+e).html(c_cache[e]),c_cache[e]="",!1}function ajax_save_comm_edit(t,e){"2"==dle_wysiwyg&&tinyMCE.triggerSave();var o=$("#dleeditcomments"+t).val();return ShowLoading(""),$.post(dle_root+"engine/ajax/controller.php?mod=editcomments",{id:t,comm_txt:o,area:e,action:"save",user_hash:dle_login_hash},function(e){HideLoading(""),c_cache[t]="",$("#comm-id-"+t).html(e)}),!1}function DeleteComments(e,t){DLEconfirm(dle_del_agree,dle_confirm,function(){ShowLoading(""),$.get(dle_root+"engine/ajax/controller.php?mod=deletecomments",{id:e,dle_allow_hash:t},function(e){var t;HideLoading(""),e=parseInt(e),isNaN(e)||(t=null,t="1"==dle_tree_comm?$("#comments-tree-item-"+e):$("#comment-id-"+e),$("html,body").stop().animate({scrollTop:t.offset().top-70},700),setTimeout(function(){t.hide("blind",{},1400)},700))})})}function MarkSpam(e,t){DLEconfirm(dle_spam_agree,dle_confirm,function(){ShowLoading(""),$.get(dle_root+"engine/ajax/controller.php?mod=adminfunction",{id:e,action:"commentsspam",user_hash:t},function(e){HideLoading(""),"error"!=e&&DLEconfirm(e,dle_confirm,function(){location.reload(!0)})})})}function doFavorites(t,e,o){return ShowLoading(""),$.get(dle_root+"engine/ajax/controller.php?mod=favorites",{fav_id:t,action:e,skin:dle_skin,alert:o,user_hash:dle_login_hash},function(e){HideLoading(""),e.success?o?DLEalert(e.content,dle_info):$("#fav-id-"+t).html(e.content):e.error&&DLEalert(e.content,dle_info)},"json"),!1}function CheckLogin(){var e=document.getElementById("name").value;return ShowLoading(""),$.post(dle_root+"engine/ajax/controller.php?mod=registration",{name:e,user_hash:dle_login_hash},function(e){HideLoading(""),$("#result-registration").html(e)}),!1}function doCalendar(e,t,o){ShowLoading(""),$.get(dle_root+"engine/ajax/controller.php?mod=calendar",{month:e,year:t},function(e){HideLoading(""),"left"==o?$("#calendar-layer").hide("slide",{direction:"left"},500,function(){$("#calendar-layer").html(e).show("slide",{direction:"right"},500)}):$("#calendar-layer").hide("slide",{direction:"right"},500,function(){$("#calendar-layer").html(e).show("slide",{direction:"left"},500)})})}function doRate(e,o){ShowLoading(""),$.get(dle_root+"engine/ajax/controller.php?mod=rating",{go_rate:e,news_id:o,skin:dle_skin,user_hash:dle_login_hash},function(e){var t;HideLoading(""),e.success?(t=(t=(t=(t=e.rating).replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/&amp;/g,"&"),$('[data-ratig-layer-id="'+o+'"]').html(t),$('[data-vote-num-id="'+o+'"]').html(e.votenum),$('[data-likes-id="'+o+'"]').html(e.likes),$('[data-dislikes-id="'+o+'"]').html(e.dislike)):e.error&&DLEalert(e.errorinfo,dle_info)},"json")}function doCommentsRate(e,o){ShowLoading(""),$.get(dle_root+"engine/ajax/controller.php?mod=ratingcomments",{go_rate:e,c_id:o,skin:dle_skin,user_hash:dle_login_hash},function(e){var t;HideLoading(""),e.success?(t=(t=(t=(t=e.rating).replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/&amp;/g,"&"),$('[data-comments-ratig-layer-id="'+o+'"]').html(t),$('[data-comments-vote-num-id="'+o+'"]').html(e.votenum),$('[data-comments-likes-id="'+o+'"]').html(e.likes),$('[data-comments-dislikes-id="'+o+'"]').html(e.dislike)):e.error&&DLEalert(e.errorinfo,dle_info)},"json")}function ajax_cancel_reply(){$("#dlefastreplycomments").hide("blind",{},1400)}function DLESendPM(e){var s={};return $("#dlesendpmpopup").remove(),$("#dleprofilepopup").remove(),s[dle_act_lang[3]]=function(){$(this).dialog("close")},s[dle_p_send]=function(){"2"==dle_wysiwyg&&tinyMCE.triggerSave();var e=$("#pm_subj").val(),t=$("#pm_text").val(),o=$("#pm_name").val(),n=$("#pm_question_answer").val(),i=$("#sec_code_pm").val(),d=$("#outboxcopy:checked").val(),l="";if(""==o)return DLEalert(dle_req_field[0],dle_info),!1;if(""==t)return DLEalert(dle_req_field[1],dle_info),!1;if(""==e)return DLEalert(dle_req_field[2],dle_info),!1;if("1"==dle_captcha_type)"undefined"!=typeof grecaptcha&&(l=grecaptcha.getResponse(recaptcha_widget));else if("2"==dle_captcha_type&&"undefined"!=typeof grecaptcha){if(""==(l=$("#pm-recaptcha-response").val())){var a=$("#pm-recaptcha-response").data("key");return grecaptcha.execute(a,{action:"personal_message"}).then(function(e){$("#pm-recaptcha-response").val(e),s[dle_p_send]()}),!1}}else"3"==dle_captcha_type&&"undefined"!=typeof hcaptcha&&(l=hcaptcha.getResponse(recaptcha_widget));return d=d||0,i=i||"",n=n||"",ShowLoading(""),$.post(dle_root+"engine/ajax/controller.php?mod=pm",{action:"send_pm",subj:e,comments:t,name:o,skin:dle_skin,sec_code:i,question_answer:n,g_recaptcha_response:l,outboxcopy:d,user_hash:dle_login_hash},function(e){var t;HideLoading(""),e.success?($("#dlesendpmpopup").remove(),DLEalert(e.success,dle_info)):e.error&&("2"==dle_captcha_type&&"undefined"!=typeof grecaptcha&&(t=$("#pm-recaptcha-response").data("key"),grecaptcha.execute(t,{action:"pm"}).then(function(e){$("#pm-recaptcha-response").val(e)})),DLEalert(e.error,dle_info))},"json"),!1},ShowLoading(""),$.get(dle_root+"engine/ajax/controller.php?mod=pm",{name:e,action:"show_send",skin:dle_skin,user_hash:dle_login_hash},function(e){HideLoading(""),$("body").append(e),$("#dlesendpmpopup").dialog({autoOpen:!0,width:800,resizable:!1,dialogClass:"modalfixed dle-popup-sendpm",buttons:s}),$(".modalfixed.ui-dialog").css({position:"fixed"}),$("#dlesendpmpopup").dialog("option","position",{my:"center",at:"center",of:window})},"html"),!1}function ajax_fast_reply(t,o,n){var e="";"1"!=dle_wysiwyg&&"2"!=dle_wysiwyg||("2"==dle_wysiwyg&&tinyMCE.triggerSave(),e="wysiwyg");var i=$("#comments"+t).val(),d=$("#name"+t).val(),l=$("#question_answer"+t).val(),a=$("#sec_code"+t).val(),s=$("#subscribe"+t+":checked").val(),r=$("#postid"+t).val(),c="";if(""==d)return DLEalert(dle_req_field[0],dle_info),!1;if(""==i)return DLEalert(dle_req_field[1],dle_info),!1;if("1"==dle_captcha_type)"undefined"!=typeof grecaptcha&&(c=grecaptcha.getResponse(recaptcha_widget));else if("2"==dle_captcha_type&&"undefined"!=typeof grecaptcha){if(""==(c=$("#comments-recaptcha-response"+t).val())){var p=$("#comments-recaptcha-response"+t).data("key");return grecaptcha.execute(p,{action:"comments"}).then(function(e){$("#comments-recaptcha-response"+t).val(e),ajax_fast_reply(t,o,n)}),!1}}else"3"==dle_captcha_type&&"undefined"!=typeof hcaptcha&&(c=hcaptcha.getResponse(recaptcha_widget));return s=s||0,a=a||"",l=l||"",ShowLoading(""),$.post(dle_root+"engine/ajax/controller.php?mod=addcomments",{post_id:r,parent:t,indent:o,comments:i,name:d,mail:"",editor_mode:e,skin:dle_skin,sec_code:a,question_answer:l,g_recaptcha_response:c,allow_subscribe:s,user_hash:dle_login_hash,needwrap:n},function(e){var t;HideLoading(""),e.error?$(e.content).insertBefore("#dlefastreplyesponse"):e.success&&($("#comm-id-"+e.id).length?(t=$(e.content).find("#comm-id-"+e.id).html(),$("#dlefastreplycomments").hide(),$("html,body").stop().animate({scrollTop:$("#comm-id-"+e.id).offset().top-100},600,function(){$("#comm-id-"+e.id).fadeOut("slow",function(){$(this).html(t+"<script>"+e.scripts+"<\/script>"),$("#comm-id-"+e.id).fadeIn("slow")})})):($(e.content+"<script>"+e.scripts+"<\/script>").insertBefore("#dlefastreplyesponse"),$("#dlefastreplycomments").hide("blind",{},500),setTimeout(function(){$("html,body").stop().animate({scrollTop:$("#dlefastreplyesponse").offset().top-100},600,function(){$("#comments-tree-item-"+e.id).show("blind",{},700)})},600)))},"json"),!1}function dle_reply(r,c,t){var p={},m="",u=0;return $("#dlereplypopup").remove(),$("#dlefastreplyesponse").remove(),$("#dlefastreplycomments").remove(),$("#comment-id-"+r).next(".comments-tree-list").length?$("#comment-id-"+r).next(".comments-tree-list").append("<div id='dlefastreplyesponse'></div>"):($("<div id='dlefastreplyesponse'></div>").insertAfter("#comment-id-"+r),u=1),p[dle_act_lang[3]]=function(){$(this).dialog("close")},p[dle_p_send]=function(){"1"!=dle_wysiwyg&&"2"!=dle_wysiwyg||("2"==dle_wysiwyg&&tinyMCE.triggerSave(),m="wysiwyg");var e=$("#comments"+r).val(),t=$("#name"+r).val(),o=$("#mail"+r).val(),n=$("#question_answer"+r).val(),i=$("#sec_code"+r).val(),d=$("#subscribe"+r+":checked").val(),l=$("#postid"+r).val(),a="";if(""==t)return DLEalert(dle_req_field[0],dle_info),!1;if(""==e)return DLEalert(dle_req_field[1],dle_info),!1;if("1"==dle_captcha_type)"undefined"!=typeof grecaptcha&&(a=grecaptcha.getResponse(recaptcha_widget));else if("2"==dle_captcha_type&&"undefined"!=typeof grecaptcha){if(""==(a=$("#comments-recaptcha-response"+r).val())){var s=$("#comments-recaptcha-response"+r).data("key");return grecaptcha.execute(s,{action:"comments"}).then(function(e){$("#comments-recaptcha-response"+r).val(e),p[dle_p_send]()}),!1}}else"3"==dle_captcha_type&&"undefined"!=typeof hcaptcha&&(a=hcaptcha.getResponse(recaptcha_widget));return d=d||0,i=i||"",n=n||"",ShowLoading(""),$.post(dle_root+"engine/ajax/controller.php?mod=addcomments",{post_id:l,parent:r,indent:c,comments:e,name:t,mail:o,editor_mode:m,skin:dle_skin,sec_code:i,question_answer:n,g_recaptcha_response:a,allow_subscribe:d,user_hash:dle_login_hash,needwrap:u},function(e){var t;HideLoading(""),e.error?$(e.content).insertBefore("#dlefastreplyesponse"):e.success&&($("#dlereplypopup").remove(),$("#comm-id-"+e.id).length?(t=$(e.content).find("#comm-id-"+e.id).html(),$("#dlefastreplycomments").hide(),$("html,body").stop().animate({scrollTop:$("#comm-id-"+e.id).offset().top-100},600,function(){$("#comm-id-"+e.id).fadeOut("slow",function(){$(this).html(t+"<script>"+e.scripts+"<\/script>"),$("#comm-id-"+e.id).fadeIn("slow")})})):($(e.content+"<script>"+e.scripts+"<\/script>").insertBefore("#dlefastreplyesponse"),$("#dlefastreplycomments").hide("blind",{},500),setTimeout(function(){$("html,body").stop().animate({scrollTop:$("#dlefastreplyesponse").offset().top-100},600,function(){$("#comments-tree-item-"+e.id).show("blind",{},700)})},600)))},"json"),!1},ShowLoading(""),$.get(dle_root+"engine/ajax/controller.php?mod=replycomments",{id:r,indent:c,skin:dle_skin,user_hash:dle_login_hash,needwrap:u},function(e){HideLoading(""),"0"!=t?($("<div id='dlefastreplycomments' style='display:none'></div>").insertAfter("#comment-id-"+r),$("html,body").stop().animate({scrollTop:$("#comment-id-"+r).offset().top+$("#comment-id-"+r).height()-100},600,function(){$("#dlefastreplycomments").html(e),setTimeout(function(){$("#dlefastreplycomments").show("blind",{},700)},200)})):($("body").append("<div id='dlereplypopup' title='"+dle_reply_title+"' style='display:none'></div>"),$("#dlereplypopup").html(e),$("#dlereplypopup").dialog({autoOpen:!0,width:800,resizable:!1,dialogClass:"modalfixed dle-popup-replycomments",buttons:p}),$(".modalfixed.ui-dialog").css({position:"fixed"}),$(".dle-popup-replycomments").css({cssText:"width:800px; max-height: none !important"}),$("#dlereplypopup").css({cssText:"height: auto !important"}),$("#dlereplypopup").dialog("option","position",{my:"center",at:"center",of:window}))},"html"),!1}function doAddComments(){var o=document.getElementById("dle-comments-form"),e="",t="",n="",i="",d="0",l="";return"1"!=dle_wysiwyg&&"2"!=dle_wysiwyg||("2"==dle_wysiwyg&&tinyMCE.triggerSave(),e="wysiwyg"),""==o.name.value?DLEalert(dle_req_field[0],dle_info):""==o.comments.value?DLEalert(dle_req_field[1],dle_info):(o.question_answer&&(t=o.question_answer.value),o.sec_code&&(n=o.sec_code.value),"1"==dle_captcha_type?"undefined"!=typeof grecaptcha&&(i=grecaptcha.getResponse()):"2"==dle_captcha_type?i=$("#g-recaptcha-response").val():"3"==dle_captcha_type&&"undefined"!=typeof hcaptcha&&(i=hcaptcha.getResponse()),o.allow_subscribe&&1==o.allow_subscribe.checked&&(d="1"),o.mail&&(l=o.mail.value),ShowLoading(""),$.post(dle_root+"engine/ajax/controller.php?mod=addcomments",{post_id:o.post_id.value,comments:o.comments.value,name:o.name.value,mail:l,editor_mode:e,skin:dle_skin,sec_code:n,question_answer:t,g_recaptcha_response:i,allow_subscribe:d,user_hash:dle_login_hash},function(e){var t;HideLoading(""),e.error?$("#dle-ajax-comments").append(e.content):e.success&&($("#comm-id-"+e.id).length?(t=$(e.content).find("#comm-id-"+e.id).html(),$("html,body").stop().animate({scrollTop:$("#comm-id-"+e.id).offset().top-100},600,function(){$("#comm-id-"+e.id).fadeOut("slow",function(){$(this).html(t+"<script>"+e.scripts+"<\/script>"),$("#comm-id-"+e.id).fadeIn("slow")})})):($(e.content+"<script>"+e.scripts+"<\/script>").insertBefore("#dle-ajax-comments"),node=$("#comments-tree-item-"+e.id).length?$("#comments-tree-item-"+e.id):$("#blind-animation-"+e.id),$("html,body").stop().animate({scrollTop:$("#dle-ajax-comments").offset().top-100},600,function(){$(node).show("blind",{},700)})),o.sec_code&&(o.sec_code.value="",reload()),"1"==dle_captcha_type?"undefined"!=typeof grecaptcha&&grecaptcha.reset():"3"==dle_captcha_type&&"undefined"!=typeof hcaptcha&&hcaptcha.reset())},"json")),!1}function isHistoryApiAvailable(){return!(!window.history||!history.pushState)}function CommentsPage(t,o,n){return ShowLoading(""),$.get(dle_root+"engine/ajax/controller.php?mod=comments",{cstart:t,news_id:o,skin:dle_skin},function(e){HideLoading(""),isNaN(t)||isNaN(o)||($("#dle-comm-link").off("click"),$("#dle-comm-link").on("click",function(){return CommentsPage(t,o),!1})),scroll(0,$("#dle-comments-list").offset().top-100),$("#dle-comments-list").html(e.comments),$(".dle-comments-navigation").html(e.navigation),isHistoryApiAvailable()&&window.history.pushState(null,null,n)},"json"),!1}function dle_copy_quote(e,t,o){dle_txt="",window.getSelection?dle_txt=window.getSelection().toString():document.selection&&(dle_txt=document.selection.createRange().text.toString()),""!=dle_txt&&(dle_txt="0"==dle_wysiwyg||"-1"==dle_wysiwyg?"[quote="+e+"]"+dle_txt+"[/quote]":(dle_txt=dle_txt.replace(/\n/g,"<br>"),dle_txt=dle_txt.replace(/\r/g,""),'<div class="quote_block noncontenteditable"><div class="title_quote" data-commenttime="'+t+'" data-commentuser="'+e+'"'+("1"==dle_wysiwyg?' contenteditable="false"':"")+">"+o+'</div><div class="quote"><div class="quote_body contenteditable">'+dle_txt+"</div></div></div>"))}function dle_fastreply(e,t){if(!document.getElementById("dle-comments-form"))return!1;var o=document.getElementById("dle-comments-form").comments,n="",i="";return"0"==dle_wysiwyg||"-1"==dle_wysiwyg?("0"==dle_wysiwyg?o.value+="[b]"+e+"[/b], ":o.value+=e+", ",setTimeout(function(){o.focus()},800),i=".bb-editor"):(i=".wseditor","1"==dle_wysiwyg?(n=t?'<span class="comments-user-profile noncontenteditable fr-deletable" data-username="'+encodeURI(e)+'" data-userurl="'+t+'" contenteditable="false">@'+e+"</span> "+$.FE.MARKERS:"<b>"+e+"</b>, ",$("#comments").froalaEditor("events.focus"),$("#comments").froalaEditor("html.insert",n,!0)):(n=t?'<span class="comments-user-profile noncontenteditable" data-username="'+encodeURI(e)+'" data-userurl="'+t+'">@'+e+"</span> ":"<b>"+e+"</b>, ",tinyMCE.execCommand("mceInsertContent",!1,n))),setTimeout(function(){$("html,body").stop().animate({scrollTop:$(i).offset().top-100},700)},100),!1}function dle_ins(e){if(!document.getElementById("dle-comments-form"))return!1;var t=document.getElementById("dle-comments-form").comments,o="",n="";return""!=dle_txt?("0"==dle_wysiwyg||"-1"==dle_wysiwyg?(t.value+=dle_txt+"\n",setTimeout(function(){t.focus()},800),n=".bb-editor"):(o=dle_txt,n=".wseditor","1"==dle_wysiwyg?($("#comments").froalaEditor("events.focus"),$("#comments").froalaEditor("html.insert",o+$.FE.MARKERS,!0)):tinyMCE.execCommand("mceInsertContent",!1,o+"<p><br></p>")),setTimeout(function(){$("html,body").stop().animate({scrollTop:$(n).offset().top-100},700)},100)):(ShowLoading(""),$.get(dle_root+"engine/ajax/controller.php?mod=quote",{id:e,user_hash:dle_login_hash},function(e){HideLoading(""),e=(e=(e=(e=(e=(e=(e=e.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/&amp;/g,"&")).replace(/&quot;/g,'"')).replace(/&#039;/g,"'")).replace(/&#039;/g,"'")).replace(/&#34;/g,'"'),"0"==dle_wysiwyg||"-1"==dle_wysiwyg?(t.value+=e+"\n",setTimeout(function(){t.focus()},800),n=".bb-editor"):(o=e,n=".wseditor","1"==dle_wysiwyg?($("#comments").froalaEditor("events.focus"),$("#comments").froalaEditor("html.insert",o+$.FE.MARKERS,!0)):tinyMCE.execCommand("mceInsertContent",!1,o+"<p><br></p>")),setTimeout(function(){$("html,body").stop().animate({scrollTop:$(n).offset().top-100},700)},100)})),!1}function ShowOrHide(e){var t=$("#"+e),o=null;document.getElementById("image-"+e)&&(o=document.getElementById("image-"+e)),jQuery().lazyLoadXT&&$("#"+e+" *[data-src]").lazyLoadXT();e=t.height()/200*1e3;3e3<e&&(e=3e3),e<250&&(e=250),"none"==t.css("display")?(t.show("blind",{},e),o&&(o.src=dle_root+"templates/"+dle_skin+"/dleimages/spoiler-minus.gif")):(2e3<e&&(e=2e3),t.hide("blind",{},e),o&&(o.src=dle_root+"templates/"+dle_skin+"/dleimages/spoiler-plus.gif"))}function ckeck_uncheck_all(){for(var e=document.pmlist,t=0;t<e.elements.length;t++){var o=e.elements[t];"checkbox"==o.type&&(1==e.master_box.checked?o.checked=!1:o.checked=!0)}1==e.master_box.checked?e.master_box.checked=!1:e.master_box.checked=!0}function confirmDelete(e){DLEconfirm(dle_del_agree,dle_confirm,function(){document.location=e})}function setNewField(e,t){e!=selField&&(fombj=t,selField=e)}function dle_news_delete(t){var e={};e[dle_act_lang[1]]=function(){$(this).dialog("close")},allow_dle_delete_news&&(e[dle_del_msg]=function(){$(this).dialog("close");var e={};e[dle_act_lang[3]]=function(){$(this).dialog("close")},e[dle_p_send]=function(){var e;$("#dle-promt-text").val().length<1?$("#dle-promt-text").addClass("ui-state-error"):(e=$("#dle-promt-text").val(),$(this).dialog("close"),$("#dlepopup").remove(),$.post(dle_root+"engine/ajax/controller.php?mod=message",{id:t,user_hash:dle_login_hash,text:e},function(e){"ok"==e?document.location=dle_root+"index.php?do=deletenews&id="+t+"&hash="+dle_login_hash:DLEalert("Send Error",dle_info)}))},$("#dlepopup").remove(),$("body").append("<div id='dlepopup' class='dle-promt' title='"+dle_notice+"' style='display:none'>"+dle_p_text+"<br /><br /><textarea name='dle-promt-text' id='dle-promt-text' class='ui-widget-content ui-corner-all' style='width:97%;height:100px;'></textarea></div>"),$("#dlepopup").dialog({autoOpen:!0,width:500,resizable:!1,dialogClass:"modalfixed dle-popup-newsdelete",buttons:e}),$(".modalfixed.ui-dialog").css({position:"fixed"}),$("#dlepopup").dialog("option","position",{my:"center",at:"center",of:window})}),e[dle_act_lang[0]]=function(){$(this).dialog("close"),document.location=dle_root+"index.php?do=deletenews&id="+t+"&hash="+dle_login_hash},$("#dlepopup").remove(),$("body").append("<div id='dlepopup' class='dle-promt' title='"+dle_confirm+"' style='display:none'><div id='dlepopupmessage'>"+dle_del_agree+"</div></div>"),$("#dlepopup").dialog({autoOpen:!0,width:500,resizable:!1,dialogClass:"modalfixed dle-popup-newsdelete",buttons:e}),$(".modalfixed.ui-dialog").css({position:"fixed"}),$("#dlepopup").dialog("option","position",{my:"center",at:"center",of:window})}function MenuNewsBuild(e,t){var o=[];return o[0]="<a onclick=\"ajax_prep_for_edit('"+e+"', '"+t+'\'); return false;" href="#">'+menu_short+"</a>",""!=dle_admin?o[1]='<a href="'+dle_root+dle_admin+"?mod=editnews&action=editnews&id="+e+'" target="_blank">'+menu_full+"</a>":o[1]='<a href="'+dle_root+"index.php?do=addnews&id="+e+'" target="_blank">'+menu_full+"</a>",allow_dle_delete_news&&(o[2]="<a onclick=\"sendNotice ('"+e+'\'); return false;" href="#">'+dle_notice+"</a>",o[3]="<a onclick=\"dle_news_delete ('"+e+'\'); return false;" href="#">'+dle_del_news+"</a>"),o}function sendNotice(t){var e={};e[dle_act_lang[3]]=function(){$(this).dialog("close")},e[dle_p_send]=function(){var e;$("#dle-promt-text").val().length<1?$("#dle-promt-text").addClass("ui-state-error"):(e=$("#dle-promt-text").val(),$(this).dialog("close"),$("#dlepopup").remove(),$.post(dle_root+"engine/ajax/controller.php?mod=message",{id:t,user_hash:dle_login_hash,text:e,allowdelete:"no"},function(e){"ok"==e&&DLEalert(dle_p_send_ok,dle_info)}))},$("#dlepopup").remove(),$("body").append("<div id='dlepopup' title='"+dle_notice+"' style='display:none'>"+dle_p_text+"<br /><br /><textarea name='dle-promt-text' id='dle-promt-text' class='ui-widget-content ui-corner-all' style='width:97%;height:100px;'></textarea></div>"),$("#dlepopup").dialog({autoOpen:!0,width:500,resizable:!1,dialogClass:"modalfixed dle-popup-sendmessage",buttons:e}),$(".modalfixed.ui-dialog").css({position:"fixed"}),$("#dlepopup").dialog("option","position",{my:"center",at:"center",of:window})}function AddComplaint(o,n){var e={},t="";e[dle_act_lang[3]]=function(){$(this).dialog("close")},e[dle_p_send]=function(){var e,t;$("#dle-promt-text").val().length<1?$("#dle-promt-text").addClass("ui-state-error"):(e=$("#dle-promt-text").val(),t="",$("#dle-promt-mail").val()&&(t=$("#dle-promt-mail").val()),ShowLoading(""),$.post(dle_root+"engine/ajax/controller.php?mod=complaint",{id:o,text:e,action:n,mail:t,user_hash:dle_login_hash},function(e){HideLoading(""),"ok"==e?($("#dlecomplaint").remove(),DLEalert(dle_p_send_ok,dle_info)):DLEalert(e,dle_info)}))},$("#dlecomplaint").remove(),5==dle_group&&(t=dle_mail+'<br><input type="text" name="dle-promt-mail" id="dle-promt-mail" class="ui-widget-content ui-corner-all" style="width:100%;" value="">'),$("body").append("<div id='dlecomplaint' title='"+dle_c_title+"' style='display:none'>"+dle_complaint+"<br><textarea name='dle-promt-text' id='dle-promt-text' class='ui-widget-content ui-corner-all' style='width:100%;height:140px;'></textarea>"+t+"</div>"),$("#dlecomplaint").dialog({autoOpen:!0,width:600,resizable:!1,dialogClass:"modalfixed dle-popup-complaint",buttons:e}),$(".modalfixed.ui-dialog").css({position:"fixed"}),$("#dlecomplaint").dialog("option","position",{my:"center",at:"center",of:window})}function DLEalert(e,t){$("#dlepopup").remove(),$("body").append("<div id='dlepopup' class='dle-alert' title='"+t+"' style='display:none'>"+e+"</div>"),$("#dlepopup").dialog({autoOpen:!0,width:470,resizable:!1,dialogClass:"modalfixed dle-popup-alert",buttons:{Ok:function(){$(this).dialog("close"),$("#dlepopup").remove()}}}),$(".modalfixed.ui-dialog").css({position:"fixed"}),$("#dlepopup").dialog("option","position",{my:"center",at:"center",of:window})}function DLEconfirm(e,t,o){var n={};n[dle_act_lang[1]]=function(){$(this).dialog("close"),$("#dlepopup").remove()},n[dle_act_lang[0]]=function(){$(this).dialog("close"),$("#dlepopup").remove(),o&&o()},$("#dlepopup").remove(),$("body").append("<div id='dlepopup' class='dle-confirm' title='"+t+"' style='display:none'>"+e+"</div>"),$("#dlepopup").dialog({autoOpen:!0,width:500,resizable:!1,dialogClass:"modalfixed dle-popup-confirm",buttons:n}),$(".modalfixed.ui-dialog").css({position:"fixed"}),$("#dlepopup").dialog("option","position",{my:"center",at:"center",of:window})}function DLEprompt(e,t,o,n,i){var d={};d[dle_act_lang[3]]=function(){$(this).dialog("close")},d[dle_act_lang[2]]=function(){var e;!i&&$("#dle-promt-text").val().length<1?$("#dle-promt-text").addClass("ui-state-error"):(e=$("#dle-promt-text").val(),$(this).dialog("close"),$("#dlepopup").remove(),n&&n(e))},$("#dlepopup").remove(),$("body").append("<div id='dlepopup' class='dle-promt' title='"+o+"' style='display:none'>"+e+"<br /><br /><input type='text' name='dle-promt-text' id='dle-promt-text' class='ui-widget-content ui-corner-all' style='width:97%;' value='"+t+"'/></div>"),$("#dlepopup").dialog({autoOpen:!0,width:500,resizable:!1,dialogClass:"modalfixed dle-popup-promt",buttons:d}),$(".modalfixed.ui-dialog").css({position:"fixed"}),$("#dlepopup").dialog("option","position",{my:"center",at:"center",of:window}),(0<t.length?$("#dle-promt-text").select():$("#dle-promt-text")).focus()}var dle_user_profile="",dle_user_profile_link="";function ShowPopupProfile(e,t){var o={};return o[menu_profile]=function(){document.location=dle_user_profile_link},5!=dle_group&&(o[menu_send]=function(){DLESendPM(dle_user_profile)}),1==t&&(o[menu_uedit]=function(){$(this).dialog("close");var e={};return $("body").append('<div id="modal-overlay" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #666666; opacity: .40;filter:Alpha(Opacity=40); z-index: 980; display:none;"></div>'),$("#modal-overlay").css({filter:"alpha(opacity=40)"}).fadeIn("slow"),$("#dleuserpopup").remove(),$("body").append("<div id='dleuserpopup' title='"+menu_uedit+"' style='display:none'></div>"),e[dle_act_lang[3]]=function(){$(this).dialog("close"),$("#dleuserpopup").remove()},e[dle_act_lang[5]]=function(){window.frames.edituserframe.confirmDelete(dle_login_hash)},e[dle_act_lang[4]]=function(){document.getElementById("edituserframe").contentWindow.document.getElementById("saveuserform").submit()},$("#dleuserpopup").dialog({autoOpen:!0,width:700,resizable:!1,dialogClass:"modalfixed dle-popup-userprofileadmin",buttons:e,open:function(e,t){$("#dleuserpopup").html("<iframe name='edituserframe' id='edituserframe' width='100%' height='400' src='"+dle_root+dle_admin+"?mod=editusers&action=edituser&user="+dle_user_profile+"&skin="+dle_skin+"' frameborder='0' marginwidth='0' marginheight='0' allowtransparency='true'></iframe>")},beforeClose:function(e,t){$("#dleuserpopup").html("")},close:function(e,t){$("#modal-overlay").fadeOut("slow",function(){$("#modal-overlay").remove()})}}),830<$(window).width()&&530<$(window).height()&&($(".modalfixed.ui-dialog").css({position:"fixed"}),$("#dleuserpopup").dialog("option","position",{my:"center",at:"center",of:window})),!1}),$("#dleprofilepopup").remove(),$("body").append(e),$("#dleprofilepopup").dialog({autoOpen:!0,resizable:!1,dialogClass:"dle-popup-userprofile",buttons:o,width:550}),!1}function ShowProfile(e,t,o){return dle_user_profile==e&&document.getElementById("dleprofilepopup")?$("#dleprofilepopup").dialog("open"):(dle_user_profile=e,dle_user_profile_link=t,ShowLoading(""),$.get(dle_root+"engine/ajax/controller.php?mod=profile",{name:e,skin:dle_skin,user_hash:dle_login_hash},function(e){HideLoading(""),ShowPopupProfile(e,o)})),!1}function FastSearch(){$("#story").attr("autocomplete","off"),$("#story").blur(function(){$("#searchsuggestions").fadeOut()}),$("#story").keyup(function(){var e=$(this).val();0==e.length?$("#searchsuggestions").fadeOut():dle_search_value!=e&&e.length>=dle_min_search&&(clearInterval(dle_search_delay),dle_search_delay=setInterval(function(){dle_do_search(e)},600))})}function dle_do_search(e){clearInterval(dle_search_delay),$("#searchsuggestions").remove(),$("body").append("<div id='searchsuggestions' style='display:none'></div>"),$.post(dle_root+"engine/ajax/controller.php?mod=search",{query:""+e,user_hash:dle_login_hash},function(e){$("#searchsuggestions").html(e).fadeIn().css({position:"absolute",top:0,left:0}).position({my:"left top",at:"left bottom",of:"#story",collision:"fit flip"})}),dle_search_value=e}function ShowLoading(e,t,o){var n="";void 0===t&&(t="center"),void 0===o&&(o="center"),void 0===e&&(o=""),$("#loading-layer").remove(),0!==e.length&&e.trim()?(n="withtext",e="<span>"+e+"</span>"):(e='<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" width="32px" height="32px" viewBox="0 0 128 128" xml:space="preserve"><g><path fill="#ffffff" d="M64,128a64,64,0,1,1,64-64A64,64,0,0,1,64,128ZM64,2.75A61.25,61.25,0,1,0,125.25,64,61.25,61.25,0,0,0,64,2.75Z"/><path fill="#ffffff" d="M64 128a64 64 0 1 1 64-64 64 64 0 0 1-64 64zM64 2.75A61.2 61.2 0 0 0 3.34 72.4c1.28-3.52 3.9-6.32 7.5-6.86 6.55-1 11.9 2.63 13.6 8.08 3.52 11.27.5 23 15 35.25 19.47 16.46 40.34 13.54 52.84 9.46A61.25 61.25 0 0 0 64 2.75z"/><animateTransform attributeName="transform" type="rotate" from="0 64 64" to="360 64 64" dur="1400ms" repeatCount="indefinite"></animateTransform></g></svg>',n="withouttext"),$("body").append('<div id="loading-layer" class="'+n+'" style="display:none">'+e+"</div>");var i=($(window).width()-$("#loading-layer").outerWidth())/2,d=($(window).height()-$("#loading-layer").outerHeight())/2;switch(t){case"left":i=15;break;case"right":i=$(window).width()-$("#loading-layer").outerWidth()-15}switch(o){case"top":d=15;break;case"bottom":d=$(window).height()-$("#loading-layer").outerHeight()-15}$("#loading-layer").css({left:i+"px",top:d+"px",position:"fixed",zIndex:"9999"}),$("#loading-layer").fadeTo("slow",1)}function HideLoading(e){$("#loading-layer").fadeOut("slow",function(){$("#loading-layer").remove()})}function ShowAllVotes(){return document.getElementById("dlevotespopup")?$("#dlevotespopup").dialog("open"):($.ajaxSetup({cache:!1}),ShowLoading(""),$.get(dle_root+"engine/ajax/controller.php?mod=allvotes&dle_skin="+dle_skin,function(e){HideLoading(""),$("#dlevotespopup").remove(),$("body").append(e),$(".dlevotebutton").button(),$("#dlevotespopup").dialog({autoOpen:!0,resizable:!1,dialogClass:"dle-popup-allvotes",width:600}),400<$("#dlevotespopupcontent").height()&&$("#dlevotespopupcontent").height(400),$("#dlevotespopup").dialog("option","height",$("#dlevotespopupcontent").height()+60),$("#dlevotespopup").dialog("option","position","center")})),!1}function fast_vote(t){var e=$("#vote_"+t+" input:radio[name=vote_check]:checked").val();return void 0===e||(ShowLoading(""),$.get(dle_root+"engine/ajax/controller.php?mod=vote",{vote_id:t,vote_action:"vote",vote_mode:"fast_vote",vote_check:e,dle_skin:dle_skin,user_hash:dle_login_hash},function(e){HideLoading(""),$("#dle-vote_list-"+t).fadeOut(500,function(){$(this).html(e),$(this).fadeIn(500)})})),!1}function AddIgnorePM(e,t){DLEconfirm(t,dle_confirm,function(){ShowLoading(""),$.get(dle_root+"engine/ajax/controller.php?mod=adminfunction",{id:e,action:"add_ignore",skin:dle_skin,user_hash:dle_login_hash},function(e){return HideLoading(""),DLEalert(e,dle_info),!1})})}function DelIgnorePM(t,e){return DLEconfirm(e,dle_confirm,function(){ShowLoading(""),$.get(dle_root+"engine/ajax/controller.php?mod=adminfunction",{id:t,action:"del_ignore",skin:dle_skin,user_hash:dle_login_hash},function(e){return HideLoading(""),$("#dle-ignore-list-"+t).html(""),DLEalert(e,dle_info),!1})}),!1}function DelSocial(t,e){return DLEconfirm(e,dle_confirm,function(){ShowLoading(""),$.get(dle_root+"engine/ajax/controller.php?mod=adminfunction",{id:t,action:"del_social",user_hash:dle_login_hash},function(e){return HideLoading(""),$("#dle-social-list-"+t).html(""),DLEalert(e,dle_info),!1})}),!1}function subscribe(e,t){var o=dle_sub_agree;return 0==t&&(o=dle_unsub_agree),DLEconfirm(o,dle_confirm,function(){ShowLoading(""),$.get(dle_root+"engine/ajax/controller.php?mod=commentssubscribe",{news_id:e,skin:dle_skin,sub_action:t,user_hash:dle_login_hash},function(e){HideLoading(""),e.success?DLEalert(e.info,dle_info):e.error&&DLEalert(e.errorinfo,dle_info)},"json")}),!1}var media_upload_manager=!1;function media_upload(e,t,o,n){var i="none",d=e+t+o+n;return $("#mediaupload").hasClass("ui-dialog-content")&&media_upload_manager==d?($("#mediaupload").dialog("open"),check_all()):($("#mediaupload").remove(),$("body").append("<div id='mediaupload' class='mediaupload-body' title='"+text_upload+"' style='display:none'></div>"),ShowLoading(""),$.get(dle_root+"engine/ajax/controller.php",{mod:"upload",area:e,news_id:o,author:t,wysiwyg:n},function(e){HideLoading(""),$("#mediaupload").html(e);var t=.9*$(window).height(),e=.9*$(window).width();830<e&&(e=830),600<t&&(t=600),$("#mediaupload").dialog({autoOpen:!0,width:e,height:t,resizable:!1,dialogClass:"modalfixed dle-popup-mediaupload",open:function(e,t){$(".dle-popup-mediaupload").append($("#mediaupload-buttonpane").html()),$("#mediaupload-buttonpane").remove()},dragStart:function(e,t){i=$(".modalfixed").css("box-shadow"),$(".modalfixed").fadeTo(0,.7).css("box-shadow","none"),$("#mediaupload").css("visibility","hidden")},dragStop:function(e,t){$(".modalfixed").fadeTo(0,1).css("box-shadow",i),$("#mediaupload").css("visibility","visible")}}),media_upload_manager=d,830<$(window).width()&&530<$(window).height()&&($(".modalfixed.ui-dialog").css({position:"fixed"}),$("#mediaupload").dialog("option","position",{my:"center",at:"center",of:window}))},"html")),!1}function dropdownmenu(e,t,o,n){window.event?event.cancelBubble=!0:t.stopPropagation&&t.stopPropagation();t=$("#dropmenudiv");if(t.is(":visible"))return clearhidemenu(),t.fadeOut("fast"),!1;t.remove(),$("body").append('<div id="dropmenudiv" style="display:none;position:absolute;z-index:100;width:165px;"></div>'),(t=$("#dropmenudiv")).html(o.join("")),n&&t.width(n);o=$(document).width()-30,n=$(e).offset();return o-n.left<t.width()&&(n.left=n.left-(t.width()-$(e).width())),t.css({left:n.left+"px",top:n.top+$(e).height()+"px"}),t.fadeTo("fast",.9),t.mouseenter(function(){clearhidemenu()}).mouseleave(function(){delayhidemenu()}),$(document).one("click",function(){hidemenu()}),!1}function setcookie(e,t){var o=new Date;o.setTime(o.getTime()+26784e5);o="expires="+o.toUTCString();document.cookie=e+"="+t+";"+o+";path=/"}function get_local_storage(e){try{return localStorage.getItem(e)?JSON.parse(localStorage.getItem(e)):null}catch(e){return null}}function set_local_storage(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(e){}}function del_local_storage(e,t){try{localStorage.removeItem(e)}catch(e){}}function save_last_viewed(e){if(e=parseInt(e),isNaN(e))return null;var t=get_local_storage("viewed_ids");return $.isArray(t)?-1==$.inArray(e,t)&&(19<t.length&&t.pop(),t.unshift(e)):(t=[]).push(e),set_local_storage("viewed_ids",t),setcookie("viewed_ids",t.join()),!0}function hidemenu(e){$("#dropmenudiv").fadeOut("fast")}function delayhidemenu(){delayhide=setTimeout("hidemenu()",1e3)}function clearhidemenu(){"undefined"!=typeof delayhide&&clearTimeout(delayhide)}jQuery(function(n){var o=!1,e=new Array,i="";n(document).keydown(function(e){if(13==e.which&&e.ctrlKey){var t;if(e.preventDefault(),window.getSelection?t=window.getSelection():document.getSelection?t=document.getSelection():document.selection&&(t=document.selection.createRange().text),""==t)return!1;if(255<t.toString().length)return DLEalert(dle_big_text,dle_info),!1;e={};e[dle_act_lang[3]]=function(){n(this).dialog("close")},e[dle_p_send]=function(){var e,t,o;n("#dle-promt-text").val().length<1?n("#dle-promt-text").addClass("ui-state-error"):(e=n("#dle-promt-text").val(),t=n("#orfom").text(),o="",n("#dle-promt-mail").val()&&(o=n("#dle-promt-mail").val()),ShowLoading(""),n.post(dle_root+"engine/ajax/controller.php?mod=complaint",{seltext:t,text:e,mail:o,user_hash:dle_login_hash,action:"orfo",url:window.location.href},function(e){HideLoading(""),"ok"==e?(n("#dlecomplaint").remove(),DLEalert(dle_p_send_ok,dle_info)):DLEalert(e,dle_info)}))},n("#dlecomplaint").remove(),5==dle_group&&(i=dle_mail+'<br><input type="text" name="dle-promt-mail" id="dle-promt-mail" class="ui-widget-content ui-corner-all" style="width:100%;" value="">'),n("body").append("<div id='dlecomplaint' class='dle-promt' title='"+dle_c_title+"' style='display:none'>"+dle_orfo_title+"<br><textarea name='dle-promt-text' id='dle-promt-text' class='ui-widget-content ui-corner-all' style='width:100%;height:140px;'></textarea>"+i+"<div id='orfom' style='display:none'>"+t+"</div></div>"),n("#dlecomplaint").dialog({autoOpen:!0,width:600,resizable:!1,dialogClass:"modalfixed dle-popup-complaint",buttons:e}),n(".modalfixed.ui-dialog").css({position:"fixed"}),n("#dlecomplaint").dialog("option","position",{my:"center",at:"center",of:window})}}),setTimeout(function(){n("img[data-maxwidth]").each(function(){var e=n(this).width(),t=n(this).data("maxwidth");n(this)[0].naturalWidth&&(e=n(this)[0].naturalWidth),t<e&&(n(this).width(t),n(this).wrap('<a href="'+n(this).attr("src")+'" data-highslide="single" target="_blank"></a>'),"undefined"==typeof Fancybox&&0==o&&(o=!0,n.getCachedScript(dle_root+"engine/classes/fancybox/fancybox.js")))})},300),setTimeout(function(){n("div[data-dlebclicks]").each(function(){var e=n(this).data("dlebid");n(this).find("a").on("click",function(){n.post(dle_root+"engine/ajax/controller.php?mod=adminfunction",{id:e,action:"bannersclick",user_hash:dle_login_hash})})})},400),n("div[data-dlebviews]").each(function(){e.push(n(this).data("dlebid"))}),e.length&&setTimeout(function(){n.post(dle_root+"engine/ajax/controller.php?mod=adminfunction",{"ids[]":e,action:"bannersviews",user_hash:dle_login_hash})},1e3),n(document).on("click",".comments-user-profile",function(e){return n(this).data("userurl")&&n(this).data("username")&&ShowProfile(n(this).data("username"),n(this).data("userurl"),0),!1})}),jQuery.getCachedScript=function(e,t){return t=$.extend(t||{},{dataType:"script",cache:!0,url:e}),jQuery.ajax(t)};